<h3>Status Advance/Decline Activity</h3><hr>

<% @taggings.group_by(&:tag_id).each do |g,t| %>

<div style="float:none;clear:both;">
	<strong style="float:left;"><%= Tag.find(g).name %></strong>
	<strong style="float:right;"># in group: <%= t.length %></strong>
</div><br>

<table border="0" cellspacing="0" cellpadding="4" width="100%">
	<tr>
		<th>Date</th>
		<th>Name</th>
		<th>Family</th>
		<th>Current Status</th>
	</tr>
<% t.sort_by {|p| p.person ? p.person.last_first_name : false }.each do |tagging| %>
	<tr>
		<td><%= tagging.start_date.strftime('%m/%d/%Y') rescue nil %></td>	
		<td><%= tagging.person.full_name rescue nil %></td>
		<td><%= tagging.person.household.people.sort_by(&:sort_order).collect {|p| p.family_name}.to_sentence rescue nil %></td>
		<td><%= tagging.person.attendance_status rescue nil %></td>
	</tr>
<% end %>
</table><br>

<% end %>
